package com.yanqu.road.entity.log;

import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.log.maidian.BaseLogEntity;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@FieldTypeAnnotation(tableName = "t_l_ck_zhenhuan_second_going_out", desc = "甄嬛无双门客-甄嬛二阶段出行", autoSave = true, dataUpload = true, eventName = "zhguest_secplay", uploadCk = true)
public class LogZhenHuanSecondGoingOut extends ServerBaseLog {
    @FieldTypeAnnotation(desc = "活动Id", isIndex = true, dataAttribute = "activityid")
    private int activityId;
    @FieldTypeAnnotation(desc = "玩家ID", isIndex = true)
    private long userId;
    @FieldTypeAnnotation(desc = "使用前体力", dataAttribute = "zhguest_secplaybeforenum")
    private int beforePower;
    @FieldTypeAnnotation(desc = "使用体力/出行次数", dataAttribute = "zhguest_secplaytype")
    private int usePower;
    @FieldTypeAnnotation(desc = "增加的喜爱度", dataAttribute = "zhguest_secplaylike")
    private long addLoveDegree;
    @FieldTypeAnnotation(desc = "地点增加的进度", dataAttribute = "zhguest_secplayadd", saveJson = true)
    private Map<Integer, Integer> placeAddMap = new HashMap<>();
    @FieldTypeAnnotation(desc = "满进度的地点次数", dataAttribute = "zhguest_secplayfull", saveJson = true)
    private Map<Integer, Integer> placeFullMap = new HashMap<>();
    @FieldTypeAnnotation(desc = "地点奖励", dataAttribute = "zhguest_secspecialget")
    private String placeReward;
    @FieldTypeAnnotation(desc = "满进度奖励", dataAttribute = "zhguest_secspecialextget")
    private String fullReward;
    @FieldTypeAnnotation(desc = "时间")
    private Date logTime;


    public LogZhenHuanSecondGoingOut(int activityId, long userId, int beforePower, int usePower, long addLoveDegree, Map<Integer, Integer> placeAddMap, Map<Integer, Integer> placeFullMap, String placeReward, String fullReward) {
        this.activityId = activityId;
        this.userId = userId;
        this.beforePower = beforePower;
        this.usePower = usePower;
        this.addLoveDegree = addLoveDegree;
        this.placeAddMap = placeAddMap;
        this.placeFullMap = placeFullMap;
        this.placeReward = placeReward;
        this.fullReward = fullReward;
        this.logTime = new Date();
    }

    @Override
    public long getUserId() {
        return userId;
    }
}
